home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / rmastr02.zip / DEMO1.PAS < prev    next >
Pascal/Delphi Source File  |  1991-09-22  |  965b  |  40 lines

  1. (*
  2.  
  3.    ----------------------------------------------------------
  4.    ReadBgf function                                     RWBgf
  5.    ----------------------------------------------------------
  6.  
  7.    Function   : Reads a BGF file in memory.
  8.  
  9.    Decloration: ReadBgf(Filename : String; Var Img : Pointer)
  10.  
  11.    Result type: Word
  12.  
  13.    Remarks    : This function automatically allocates the
  14.                 required memory and reads in the Image.
  15.                 The return value is the size of the Image.
  16.                 NO checking is done to verify that the file
  17.                 being loaded is a valid BGF file.  I/O
  18.                 checking is NOT performed.
  19. *)
  20.  
  21.  
  22.  
  23.  
  24. Program Demo1;
  25.  Uses Graph,RWBgf;
  26. Var
  27.  Img  : Pointer;
  28.  Size : Word;
  29.  Gd   : Integer;
  30.  Gm   : Integer;
  31. Begin
  32.  Gd:=EGA;
  33.  Gm:=EGAhi;
  34.  InitGraph(Gd,Gm,'');
  35.  Size:=ReadBgf('GCAR.BGF',Img);
  36.  PutImage(300,120,Img^,NormalPut);
  37.  FreeMem(Img,Size);
  38.  Readln;
  39.  CloseGraph;
  40. End.